package com.xianniu.ltc.feign.api;

import com.xianniu.ltc.config.FeignConfiguration;
import com.xianniu.ltc.feign.hystrix.AuthServiceHystrix;
import com.xianniu.ltc.model.po.AuthOrganizationPO;
import com.xxl.sso.core.entity.ReturnT;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

/**
 * @author yk
 * @version 1.0
 * @description: api项目feign接口
 * @date 2021/8/31 10:50
 */
@FeignClient(value = "xianniu-auth", fallback = AuthServiceHystrix.class, configuration = FeignConfiguration.class)
public interface AuthService {

    @PostMapping("/organization/addOrExit")
    ReturnT addOrExit(@RequestBody AuthOrganizationPO param, @RequestHeader("xnToken") String token);

    @PostMapping("/organization/del")
    ReturnT del(@RequestBody AuthOrganizationPO param, @RequestHeader("xnToken") String token);

}
